<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateGoodsNexusTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('goods_nexus', function(Blueprint $table)
		{
			$table->increments('id')->comment('商品标签管理表对应商品表的序号');
			$table->integer('goods_id')->nullable()->comment('对应商品表的id');
			$table->string('rfid')->nullable()->comment('rfid码');
			$table->integer('state')->nullable()->default(0)->comment('0为未购买 1为已出售');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('goods_nexus');
	}

}
